"hamcrest 0.1.0 (git+https://github.com/carllerche/hamcrest-rust.git)",
"kernel32-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libgit2-sys 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"num_cpus 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)",
use git2;
use glob::Pattern;
-use libc;
use core::{Package, PackageId, Summary, SourceId, Source, Dependency, Registry};
use ops;
// the untracked files are often part of a build and may become relevant
// as part of a future commit.
let index_files = index.iter().map(|entry| {
- let is_dir = entry.mode & (libc::S_IFMT as u32) ==
- (libc::S_IFDIR as u32);
+ use libgit2_sys::git_filemode_t::GIT_FILEMODE_COMMIT;
+ let is_dir = entry.mode == GIT_FILEMODE_COMMIT as u32;
(join(&root, &entry.path), Some(is_dir))
});
let mut opts = git2::StatusOptions::new();